package com.interview.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author JiangYingbo
 */
@Configuration
public class SpringDocConfig {
    private final static String TITLE = "智能面试助手";
    private final static String VERSION = "v1.0.1";
    private final static String EMAIL = "www.2485317872@qq.com";
    private final static String NAME = "JiangYb";
    private final static String URL = "http:/localhost:8080";
    private final static String DESCRIPTION = "<em>"+ "智能面试助手" + "</em>";

    /**
     * 通用信息展板
     */
    @Bean
    public OpenAPI commonInfo() {
        return new OpenAPI().info(new Info()
                .title(TITLE)
                .description(DESCRIPTION)
                .version(VERSION)
                .contact(new Contact().email(EMAIL).name(NAME).url(URL)));
    }

}